"""
@Author  : 康帅
@Time    : 2021/3/19 10:03
@Function: 外观模式:学生入学案例
"""


class Register:
    """ 报道登记 """

    def register(self, name):
        print(f"活动中心：{name}同学报道成功！")


class Payment:
    """ 缴费中心 """

    def payment(self, money, mame):
        print(f"缴费中心：收到{mame}同学缴费{money}元，缴费成功！")


class DormitoryManagementCenter:
    """ 生活中心（宿舍管理中心）"""

    def provide_living_goods(self, name):
        print(f"生活中心：{name}同学的生活用品已经发放")


class Dormitory:
    """ 宿舍 """

    def meet_room_mate(self, name):
        print("宿 舍：" + f'大家好，这是刚来{name}同学，相互认识下！')


class Volunteer:
    """ 迎新志愿者 """

    def __init__(self, name):
        self.__name = name
        self.__register = Register()
        self.__payment = Payment()
        self.__life_center = DormitoryManagementCenter()
        self.__dormitory = Dormitory()

    def welcome_freshmen(self, name):
        print(f"你好，{name}同学！我是新生报道的志愿者{self.__name},我将带你完成报道流程")
        self.__register.register(name)
        self.__payment.payment(1000, name)
        self.__life_center.provide_living_goods(name)
        self.__dormitory.meet_room_mate(name)


if __name__ == '__main__':
    volunteer = Volunteer("Frank")
    volunteer.welcome_freshmen("Tony")
